Study on environmental factors affecting the quality of codonopsis radix based on MaxEnt model and all-in-one functional factor

Owing to the increasing market demand of Codonopsis Radix, the cropper blindly cultivates to expand planting area for economic benefits, which seriously affects the quality of Codonopsis Radix. Therefore, this study synthesized 207 batches of Codonopsis Radix and 115 ecological factors, and analyzed the suitable planting areas of Codonopsis pilosula under current and future climate change based on Geographic Information System (GIS) and MaxEnt model. Secondly, we evaluated the quality of Codonopsis Radix based on the all-in-one functional factor including chromatographic fingerprint, the index components, the effective compounds groups, the nutritional components, and the nutritional elements, and the quality regionalization of Codonopsis Radix was analyzed. Finally, the ecological factors affecting the accumulation of effective components of Codonopsis Radix were analyzed. This study found for the first time that the highly suitable area of Codonopsis pilosula was mainly distributed in the Weihe River system and the Bailongjiang River system in Gansu Province. There were differences in the quality of Codonopsis Radix from different ecologically suitable areas based on the all-in-one functional factors, and the comprehensive high-quality area of Codonopsis Radix was mainly distributed in Longnan and Longxi district of Gansu Province. The precipitation, temperature and altitude play a key role in the accumulation of chemical components in the 10 ecological factors affecting the distribution of Codonopsis pilosula. Under future climatic conditions, the highly suitable area of Codonopsis pilosula is decreased.

administrative map vector data of Gansu Province to generate the spatial distribution map of Codonopsis pilosula in Gansu Province through ArcGis (Fig. 1A).The output results of the accuracy test of the Codonopsis pilosula maximum entropy model is displayed in Fig. 1B and Fig. S1.The omission rate of training samples in the analysis omission/debugging curve was consistent with the prediction omission rate, the AUC values of the training set and the test set in the receiver operating curve were 0.957 and 0.940, respectively.Indicating the prediction effect of the model was excellent.In conclusion, the modeling results can be used for habitat suitability analysis of Codonopsis pilosula.
Through multiple iterative arithmetics on 115 ecological factors, excluded those with a contribution rate of 0, and then through correlation analysis, 15 important ecological factors were obtained.Their percent contribution and importance are shown in Table 2.The contribution of ecological factors to the distribution of Codonopsis pilosula was determined according to the results of the Jackknife method.In the bar chart, the longer the blue one and the shorter the green one indicating that the represent variable has a more important effect on the distribution of Codonopsis pilosula.According to the results (Fig. 1C), the weight order of each ecological factor on the distribution of Codonopsis pilosula was as follows: Solar Radiation of October (srad-10), Precipitation of November (prec-11), Precipitation of May (prec-5), Precipitation of October (prec-10), Precipitation of April (prec-4), Max Temperature of Warmest Month (bio-5), Min Temperature of Coldest Month (bio-6), Soil Unit Symbol (FAO-90) (su_sym90), Altitude (elev), Topsoil Organic Carbon (t_oc), Topsoil Clay Fraction (t_clay), Isothermality (bio-3), Soil available water capacity class (awc_class), Precipitation of Driest Month (bio-14), Topsoil Sand Fraction (t_sand).According to the percent contribution, permutation importance, and weight, the common ecological factors were taken as the main ecological factors, and the cumulative contribution rate reached 92.7%.To sum up, precipitation, temperature, altitude, and solar radiation have the greatest effect on the growth of Codonopsis pilosula.Combined with the results of the knife-cut test and the contribution rate, the  www.nature.com/scientificreports/univariate response curve analysis was performed on the 10 main ecological factors affecting the distribution of Codonopsis pilosula.When the probability value was greater than 0.30, the variable range was more suitable for species distribution.When the probability value was greater than 0.50, the variable range was most suitable for species distribution.The results are shown in Table S1 and Fig. S2.
The habitat suitability results of Codonopsis pilosula calculated by MaxEnt model software were imported into ArcGIS software to obtain the habitat suitability distribution map of Codonopsis pilosula in Gansu Province, and the potentially suitable area of Codonopsis pilosula was calculated (Fig. 1D and Table S3).The suitability distribution area of Codonopsis pilosula was mainly located in the southeast of Gansu Province.The total area of highly suitable area was 1.78 × 10 4 km 2 , accounting for 4.15% of the area in Gansu Province, mainly distributed in Dingxi City and Longnan City.There was also a small amount of distribution in Linxia Hui Autonomous Prefecture, Gannan Tibetan Autonomous Prefecture, and Tianshui city.The moderate suitable area and low suitable area areas for Codonopsis pilosula were 2.12 × 10 4 km 2 and 4.25 × 10 4 km 2 , respectively, accounting for 4.94% and 9.90% of the total area of Gansu Province, moderate suitable area mainly distributed around the highly suitable area, and low suitable area was distributed in other areas of Gansu Province except for Jiuquan City and Jiayuguan City.
Analyzed the changes in the suitable habitat of Codonopsis pilosula under climate change conditions (Fig. 2), calculated the change rate compared with the current suitable habitat of Codonopsis Radix (Fig. 2).Under the four future climate scenarios of SSP126-2050s, SSP585-2050s, SSP126-2090s, and SSP585-2090s, the moderately suitable areas showed an increasing trend, with an area of 2.52 × 10 4 km 2 , 2.78 × 10 4 km 2 , 2.66 × 10 4 km 2 , and 2.34 × 10 4 km 2 respectively, with the change rates of 18.73%, 31.11%,25.52%, and 10.23% respectively, and most of the increased moderate suitable areas were located in Dingxi City, Longnan City, and Linxia Hui Autonomous Prefecture.The highly suitable area showed an increasing trend under SSP126 climate scenario and a decreasing trend under SSP585 climate scenario, especially by 2090s, the area was reduced to 1.51 × 10 4 km 2 , with a change rate of -15.38% (Fig. 2D).The increased highly suitable areas were mainly in Dingxi City and Tianshui City, while decreased in Longnan City and Linxia Hui Autonomous Prefecture.In addition, under the SSP585-2090s climate scenario, the low suitable area also showed a decreasing trend, and the area was reduced to 3.50 × 10 4 km 2 , most of the reduced areas were located in Jinchang City, Wuwei City, Baiyin City, Pingliang City, and Qingyang City.In the different climate scenarios except for SSP585-2090s, the total suitable area of Codonopsis pilosula in Gansu province is increased.The chromatographic fingerprint of TCM can comprehensively reflect the types and quantities of chemical components contained in TCM and thus provide an overall description and evaluation of the quality of TCM.Sample S1 was selected for methodological validation, and the results showed that the relative standard deviation (RSD) of precision, repeatability, and stability were all less than 4.2%(required to be less than 5%), indicating that the established method is suitable for the establishment of the HPLC fingerprint of Codonopsis Radix.We imported the chromatograms of each sample into the "Similarity Evaluation System for Traditional Chinese Medicine Chromatographic Fingerprints, 2012 Edition" 30 S4.Further calculating the principal component load matrix, the results are shown in Table S5.Common peaks with a contribution degree greater than 0.8 were selected for the five principal components, namely common peaks 1, 4, 5, 6, 9, 10, 11, 12, 14, 15, and 19.They will be used as indicators for subsequent correlation analysis.Through the determination of the index components, effective compounds groups, nutritional components, nutrient elements, and the establishment of chromatographic fingerprint in 134 batches of Codonopsis Radix from different producing areas in Gansu Province, the results showed that there were some differences in the contents of lobetyolin, atractylenolide III, syringin, polysaccharides, oligosaccharides, alcohol extract, amino acids, protein, fat, dietary fiber, total nutrient elements and common peaks 1, 4, 5, 6, 9, 10, 11, 12, 14, 15, 19 in Codonopsis Radix from different producing areas.The habitat suitability values of 134 samples were extracted by ArcGIS and classified according to the classification rules under item 5.1(Table S6).Mann-Whitney U test indicated that the concentrations of the functional factors in Codonopsis Radix from different suitable areas are different (Fig. S3).The average concentrations of lobetyolin, polysaccharides, oligosaccharides, fat, common peak 1 area, common peak 5 area, common peak 10 area, common peak 12 area, and common peak 14 area from highly suitable areas were significantly higher than moderately suitable areas (P < 0.05).On the contrary, the average concentrations of alcohol extract and common peak 6 area from highly suitable areas were lower than in moderately suitable areas (P < 0.05).However, The average concentrations of atractylenolide III, syringin, amino acids, protein, dietary fiber, total nutrient elements, common peak 4 area, common peak 9 area, common peak 11 area, common peak 15 area, and common peak 19 area had no remarkable difference between the two categories (P > 0.05).Further, based on the all-in-one functional factor, the PCA method was used to study the geographical variation of Codonopsis Radix.As shown in Fig. 3B, the trend of separation according to the habitat suitability of the sample can be observed, indicating that there are differences in the chemical composition of Codonopsis Radix between different suitable habitats, which further illustrates the accuracy of the established MaxEnt model.
The correlation between functional factors and ecological factors was analyzed using SPSS.The concentrations of 22 functional factors were set as Y values, and the ten ecological factors screened were set as X values.Based on the results of stepwise regression analysis, the relationship model between functional factors and ecological factors was established (Table 4).The P value of the F-test result of the regression equation of each functional factor and the T-test result of the regression coefficient was significantly less than 0.05, indicating that the regression equation had a good prediction effect.The spatial analysis function of ArcGIS software was used to estimate the spatial distribution of functional factor concentration of Codonopsis Radix (Fig. S4).On this basis, based on the analysis results of habitat suitability, after removing the unsuitable distribution area, the concentration spatial distribution map of fingerprint common peaks, index components, and effective compounds groups was superimposed with the habitat suitability distribution map to obtain the medicinal quality zoning map of Codonopsis Radix in Gansu Province (Fig. S5).By superimposing the concentration spatial distribution map of nutritional components and nutritional elements with the distribution map of habitat suitability, the edible quality zoning map of Codonopsis Radix in Gansu Province was obtained (Fig. S6).Further, the quality zoning map of Codonopsis Radix in Gansu Province was obtained by superposing the 22 spatial distribution maps of the functional factors concentrations with the habitat suitability distribution map. Figure 3C illustrates visually that the comprehensive high-quality area of Codonopsis Radix was mainly distributed in Longnan and Longxi district of Gansu Province, such as Weiyuan County and Wenxian County.Two high-quality distribution areas suitable for Codonopsis pilosula planting were first found in the eastern part of Gansu Province while this area was not considered suitable for growing Codonopsis pilosula previously, such as Qingyang City and Pingliang City.www.nature.com/scientificreports/

Correlation analysis between ecological factors and functional factors of Codonopsis Radix
Spearman correlation analysis results showed that the 10 main ecological factors had different influence on the accumulation of functional factors in Codonopsis Radix (Fig. 4).Firstly, the 10 ecological factors were divided into three categories by cluster analysis.Among  Atractylodes III, polysaccharides, oligosaccharide, alcohol extract, amino acid, fat, common peak 5 area, common peak 9 area, common peak 10 area, common peak 12 area, and common peak 11 area were clustered into one group, which was negatively related to precipitation ecological factors.In addition, there was a highly significant relationship between the common peak 6 area, common peak 15 area, and common peak 14 area with Soil Unit Symbol (FAO-90) (P < 0.01).The increase of altitude was beneficial to the increase of oligosaccharide, total nutrient elements, common peak 4 area, common peak 11 area, and common peak 14 area (P < 0.01), but was not conducive to the accumulation of polysaccharide and alcohol extracts of Codonopsis Radix.

Discussion
This study combined MaxEnt model and GIS technology to analyze the habitat suitability distribution of Codonopsis pilosula in Gansu Province.The predicted AUC value was high, and the predicted potential suitable distribution area was basically consistent with the distribution of Codonopsis pilosula recorded in the literature 11 , indicating that the potential distribution of species predicted by MaxEnt model had high accuracy.When we established MaxEnt model, we found that the maximum temperature, minimum temperature, water vapor pressure, wind speed, and solar radiation from January to December were not used as ecological factors in the analysis of habitat suitability distribution of Codonopsis pilosula 26 .The research showed that the maximum temperature, minimum temperature 42,43 , water vapor pressure, wind speed 44 , and solar radiation 45 were important factors affecting the growth and distribution of species.The various ecological factors have important impact on distribution of species, we imported 115 ecological factors into the MaxEnt model for analysis including 19 bioclimatic variables, temperature, precipitation, soil, topography, etc.After the screening, 10 factors were identified as the main ecological factors affecting the distribution of Codonopsis pilosula.Codonopsis pilosula is a deep-rooted plant, suitable for growing in deep, loose, well-drained soil 46 .Codonopsis pilosula is usually sown from the middle of April to the early of May, transplante after the soil is completely thawed from the middle of March to the middle of April in early spring or from the middle of September to the end of October in autumn and harvest from the late of October to the early November 47 .The precipitation in April and May plays a vital role in the germination of seeds and the growth of seedlings after sowing and the growth of Codonopsis pilosula seedlings during transplanting.Insufficient precipitation will lead to reduced germination rate and low-quality Codonopsis pilosula seedlings 48 .October precipitation and solar radiation are also essential ecological conditions for Codonopsis pilosula transplanting and a vigorous growth period.Furthermore, some studies have found that Codonopsis pilosula can grow normally at a temperature of 8 ~ 30 °C, suitable for growth at 15 ~ 25 °C, vigorous growth at about 19 °C, and when temperature is above 30 °C the growth was inhibited 48 .In this study the max temperature of warmest month suit for Codonopsis pilosula growing is 20.2 ~ 29.3 °C, which was consistent with above literature.The water resources in Gansu Province include the Yellow River Basin, Yangtze River Basin, and inland river basin.The suitability areas of Codonopsis pilosula obtained in this study were mainly distributed in the Weihe River System in the Yellow River Basin and the Bailong River System in the Yangtze River Basin, while the unsuitable areas were mainly high-altitude mountainous areas, deserts, and Gobi areas.Weihe River System 49 and Bailong River System 50 flowing through the real estate area are the main producing areas of C. pilosula and C. pilosula var.modesta in Gansu Province.The study found that the suitable area of the Bailong River system was located at an altitude of 568 ~ 3049 m, and the slope was suitable, while the unsuitable area was the high mountain with high altitude and poor soil quality, which was not conducive to the growth of Codonopsis pilosula.In addition, Zhangye City, Jinchang city, and Wuwei City, which have been proved to be unsuitable for the growth of Codonopsis pilosula by previous studies 51 .After comprehensive analysis of various types of ecological factors, we found that some areas in Zhangye City, Jinchang city and Wuwei city were suitable for the growth, indicating that the climatic conditions satisfied the needs of the normal growth and development of Codonopsis pilosula, and an appropriate scale of Codonopsis pilosula can be planned and planted in these areas.
In the analysis of the potential suitability distribution of Codonopsis pilosula under climate change conditions, we found that the highly suitable area showed an increasing trend under the SSP126 climate scenario (when the global temperature rises by 1.8 °C), and a decreasing trend under the SSP585 (when the global temperature rises by 4.4 °C) climate scenario.This was consistent with the implication of SSP126 (described as the sharp reduction of global carbon dioxide, the transformation of the economy to sustainable development) and SSP585 (described as the rapid economic growth driven by the exploitation of fossil fuels and the implementation of energy-intensive lifestyle) 52 models.The highly suitable area of Codonopsis pilosula located in the Bailong River system will be reduced, and the highly suitable area of the Weihe River system will be transferred to Tongwei county and Anding District in the northeast of Dingxi City under climate change conditions.The possible reason is that with the increasing demand for Codonopsis Radix, the demand for cultivated land is also increasing.People prefer to introduce and cultivate Codonopsis pilosula in low-altitude producing areas with convenient planting conditions, such as most Codonopsis pilosula producing areas and some new producing areas in Dingxi, Gansu Province, which brings considerable pressure to the sustainable survival of Codonopsis pilosula in high-altitude areas.At the same time, due to the longer growth cycle of Codonopsis pilosula than other crops, some high-altitude Codonopsis pilosula production areas have been replaced by other crops, which has also been proved by our field surveys, so species at high altitudes are more likely to be affected by climate change.
In this study, the quality of Codonopsis Radix from different producing areas was comprehensively evaluated by measuring the index components, functional component groups, nutrient components, and nutrient element contents and establishing fingerprints.The results showed that there were differences in the functional factors of Vol:.( 1234567890 then digging, so it is a semi-wild state.Its nutritional value is higher than that of ordinary Codonopsis pilosula and has better spleen and stomach effects.In addition, the smell of C. pilosula var.modesta will be stronger, and its effect of tonifying qi and blood will be stronger 54 .Based on the comprehensive efficacy value, nutritional value, planting conditions, and other factors, the price of C. pilosula var.modesta is higher than that of ordinary Codonopsis pilosula.Our previous field investigation also found that the current price of C. pilosula var.modesta is RMB 300~500 per kilogram, while the price of C. pilosul with a wide distribution of origin is RMB 100~200.We found that Codonopsis Radix in some low suitable areas showed higher quality, such as Kang County and Cheng County in Longnan City, and some areas of Qingyang City, Zhangye City, and Jinchang City, which may be related to environmental stress on plants.The ecological environment can be divided into prosperity and adversity.It is generally believed that prosperity is conducive to the growth of species and the accumulation of chemical components.However, in recent years, more and more studies have shown that species under the influence of environmental stress will produce some secondary metabolites to strengthen their adaptability to adversity and promote the formation of genuine medicinal materials 55 , for example, under the stress of high temperature, high humidity, and low-dose potassium deficiency, the proportion of naphtha components of Atractylodes lancea is closer to the proportion of naphtha components in genuine areas 56 .The correlation analysis between different environmental factors and functional factors showed that precipitation, temperature and altitude had the greatest influence on the quality of Codonopsis Radix.Codonopsis pilosula in Gansu Province is mostly cultivated and less wild.Based on some areas of Codonopsis pilosula under environmental stress in Gansu Province, making full use of its unique ecological and environmental conditions, we can explore reasonable planting methods for high-yield and high-quality Codonopsis pilosula.

Conclusions
In this study, a high-precision MaxEnt model was successfully established.The suitable ecological area for the growth of Codonopsis pilosula was clarified.The quality of Codonopsis Radix was systematically analyzed based on fingerprint, functional components, nutrients, and nutrient elements, and the quality and ecological environment model of Codonopsis pilosula was established based on the all-in-one functional factor, and the quality zoning of Codonopsis Radix was constructed.The comprehensive high-quality area of Codonopsis Radix has a certain correlation with the highly suitable area of Codonopsis pilosula.Temperature, precipitation, and altitude are the most important environmental factors affecting the quality of Codonopsis Radix.The spatial distribution and changes of the suitable area of Codonopsis pilosula under the future climatic conditions were further evaluated.By 2090s, the area of the highly suitable area of Codonopsis pilosula will be significantly reduced compared with the current situation.The overall research results are shown in Fig. 5.This study provides a new perspective and strategy for evaluating the influence of climate factors on the quality of Codonopsis Radix and optimizing the planting layout of Codonopsis pilosula.

Codonopsis Radix distribution points data
The Codonopsis Radix distribution points data were obtained in two channels: (1) field collection.Collect Codonopsis Radix samples on the spot and record the GPS information of the place where the samples are collected, including longitude, latitude, (2) historical data.Through Global and Chinese online databases, such as Chinese Virtual Herbarium (CVH, http:// www.cvh.ac.cn/), Global Biodiversity Information Facility (GBIF, https:// www.gbif.org/), to obtain the historical growth information of Codonopsis Radix.About 245 occurrence data points for the Codonopsis Radix were collected in this study, involving 11 cities and 24 counties in Gansu Province.In order to avoid overfitting the model, the data was imported into ArcGIS 10.2 software, only one occurrence data point was retained in the 1 km environmental grid data, and the suspected wrong occurrence points were deleted.Finally, 207 occurrence data were screened, of which 134 were from field collection, and 73 were from www.nature.com/scientificreports/historical data.The occurrence data is sorted in the excel table according to the three columns of species name, longitude, and latitude, and stored as a.csv format file to meet the requirements of the MaxEnt software.

Environmental variables
The ecological factors used in this study were shown in Table 1.The 103 climate-type data were from the World-Clim-Global Climate Data (https:// www.world clim.org/) (1970-2000).Future climate data were obtained from one global climate model (BCC-CSM2-MR, the Beijing Climate Center Climate System Model), and SSP126 and SSP585 in two simulation cycles 2041-2060 (2050s) and 2081-2100 (2090s) were selected, the ecological factors involved were bioclimatic variables (bio1-19), and monthly precipitation from January to December (prec1-12).Data of 8 soil types, from the Harmonized World Soil Database (HWSD, https:// www.fao.org/ home/ en/), the format was grid data with a spatial resolution of 1 km, including soil types, soil physical, and chemical properties, etc. Topographic data were obtained from Geospatial Data Cloud elevation data (DEM) (http:// www.gsclo ud.cn/) (the spatial resolution is 30 m), and the slope and aspect were generated by the surface analysis function of ArcGIS.Vegetation type data is provided by "Environmental & Ecological Science Data Center for West China, National Natural Science Foundation of China" (http:// westdc.westg is.ac.cn/), which was made from the vegetation subclass data.Considering that the soil, terrain, and vegetation will not change much under climate change conditions, the corresponding data obtained at present were still applicable to the future.A layer format of ASCII by ArcGIS software (version 10.2), so that it can be loaded into MaxEnt.

Species distribution modeling process
The prediction model of Codonopsis pilosula habitat suitability distribution area was established with maximum entropy model software (MaxEnt 3.4.4).Import 115 ecological factor data and 207 Codonopsis Radix distribution point data into MaxEnt, set 25% of the distribution point data as the testing dataset, and 70% were the training dataset, the maximum number of iterations was 10 4 , and set the analysis omission/debugging curve, receiver operating curve (ROC), jackknife method and response curve 57 .This research used the area under the ROC curve (AUC) and the analysis omission/debugging curve to verify the accuracy of the model prediction results.
Where the omission rate provides information on the model under and over-fitting, the test omission rate should be consistent with the theoretical omission rate for a good model 58 .When the AUC value was less than 0.6, the model prediction fails, poor (less than 0.7), good (between 0.7 and 0.9), and more than 0.9, the model prediction was excellent and the accuracy was high 59 .
To find out which variables were most important to the Codonopsis pilosula being modeled, we imported the distribution point data of Codonopsis Radix and the data of 115 ecological factors into MaxEnt for iterative calculation, and discarded the ecological factors with a contribution rate of 0 in the calculation results, and continued to iterate until all ecological factors contributed.The value of ecological factors with contribution was analyzed by Pearson correlation analysis through SPSS 22.0 to obtain the correlation coefficient.When the correlation coefficient was greater than 0.8, the smaller contribution rate of ecological factors was discarded, analyzed the remaining ecological factors by MaxEnt.Combined with the percent contribution, permutation importance, and the weight of each ecological factor in Jackknife test, the common ecological factor was taken www.nature.com/scientificreports/as the main ecological factor and ran the model 10 times.we took the average value to analyze the habitat suitability of Codonopsis pilosula and obtained the suitability range of main ecological factors through the response curve.This research used the natural breaks method (Jenks) 60 to divide the suitable areas of Codonopsis pilosula distribution: unsuitable area (0, 0.1), low suitable area (0.1, 0.3), moderate suitable area (0.3, 0.6), and high suitable area (0.6, 1.0).Meanwhile, drew the habitat suitability distribution map of Codonopsis pilosula in Gansu Province, and calculated the area of each suitable area by using the regional analysis function in ArcGIS.S2.After cleaning and drying, the Codonopsis Radix samples were crushed into powder and stored in a dry self-sealing bag for various functional factor analysis.

Establishment of fingerprint
The extraction adopts the method specified in the pharmacopeia (2020 version).The purification method was performed by a self-built laboratory method: dissolved the evaporated extract in 5 mL of 45% ethanol, and use a macroporous adsorption resin column (specification: 20 mm × 400 mm) saturated for 5 min, first eluted with 200 mL of distilled water (elution rate of 0.5 mL/min), discarded the eluent, and then eluted with 150 mL of anhydrous ethanol (elution rate of 0.5 mL/min).Collected the ethanol eluent, evaporated to dryness, dissolved in methanol, and diluted to 1 mL.Added 10 μL of the sample solution into a high-performance liquid chromatograph and determined its fingerprint.Conducted precision experiments, repeatability experiments, and stability experiments on sample S1, and conducted methodological investigations on chromatographic conditions based on the main characteristic peak area.
We selected representative chromatograms of Codonopsis Radix samples from 8 districts, imported them into the "Similarity Evaluation System for Traditional Chinese Medicine Chromatographic Fingerprints 2012 Edition", processed and analyzed the chromatograms, generated common pattern chromatograms of Codonopsis Radix from different districts, and used the common pattern chromatograms as the control chromatograms.Through multi-point correction and automatic matching, common peaks were determined, and similarity evaluation was conducted on Codonopsis Radix from 8 districts 61 .This study used SPSS software for principal component analysis.Firstly, the common peak areas of the samples were imported into SPSS for data standardization processing; Then perform factor analysis to calculate the corresponding eigenvalues and contribution rates of the principal components, and screen the principal components based on the principle of eigenvalues ≥ 1 62 ; Finally, common peaks with significant contributions to the principal component were selected based on the load factor and principal component score coefficient for subsequent correlation analysis 63  The filtrate was combined twice and concentrated to 10 mL.Finally, the filtrate was treated with 0.45 μm filter membrane and took 1.5 ml for analysis.The analytical samples of syringin: dried sample powder was accurately weighted (1.0 g) and extracted with 25 mL 75% methanol-water solution for 45 min by an ultrasound-assisted method.The filtrate was treated with 0.45 μm filter membrane and took 1.5 ml for analysis.Preparation of reference substance: Accurately weighed 1.13 mg, 1.04 mg, and 0.22 mg of the reference substances of lobetyolin, atractylenolide III, and syringin respectively, and dissolved into 0.565 mg/ml,0.52 mg/ml, and 0.11 mg/ml solution with methanol.The following methods are self built in the laboratory.The chromatographic conditions used were as follows.Lobetyolin and Atractylenolide III: Chromatographic separation of the sample solution was achieved on a Diamonsil C18 column (250 × 4.6 mm, 5 μm), and the organic phase was acetonitrile-water (Lobetyolin, 26:74, Atractylenolide III, 65:35), the column temperature (30 °C), the injection volume (10 µL), the flow rate (1.0 mL/min), and the detection wavelength was set at 267 nm (Lobetyolin), 220 nm (Atractylenolide III) 64 .Syringin: Chromatographic separation of the sample solution was achieved on a Kromasil C18 column (250 × 4.6 mm, 5 μm).The organic phase (A) was 100% acetonitrile, (B) was 0.1% phosphoric acid solution, and the flow rate was 0.8 mL/min.Gradient elution procedure: 10% A (from 0.00 to 20.00 min), 10 → 30% A (from 20.00 to 30.00 min), 30 → 70%A (from 30.00 to 50.00 min).The column temperature, the injection volume, and the detection wavelength were set the same as Atractylenolide III 65 .Injected each reference solution and sample solution into the HPLC, drew the standard curve from the measured concentration of the reference, and determined the concentration of lobetyolin, atractylenolide III, and syringin according to the standard curve.

Effective compounds groups
The polysaccharides and oligosaccharides were extracted by water extraction and alcohol precipitation.Accurately weighted 10.0 g Codonopsis Radix powder, and extracted with tenfold of 95% ethanol for two times, and each time for 1 h, discarded the filtrate.The dried residues after ethanol extraction were further extracted twice with tenfold volume of distilled water, for 45 min each time.The extracts were combined and concentrated to 1/4 of the original volume.According to the volume of the concentrated solution, an appropriate amount of 95% ethanol was slowly added to the concentrated solution, so that the final concentration of ethanol in the solution was 80%, and placed overnight.Centrifuged for 15 min with 10,600 × g centrifugal force, collected the precipitate, freeze-dried to constant weight, and got the polysaccharides.Simultaneously, collected the supernatant after centrifugation, concentrated and recovered ethanol under reduced pressure at 50 °C, 60r/min.The residue was freeze-dried to constant weight and got the oligosaccharides 66 .Then, determined the concentration of polysaccharides and oligosaccharides by the phenol-sulfuric acid assay 67 .Alcohol extract concentration determination was based on the procedures of the Chinese Pharmacopeia (2020 version) 68 .

Nutrients and elements
Amino acids concentration was determined by S-433D automatic amino acid analyzer 69 , the protein concentration in Codonopsis Radix was detected by Kjeldahl technique 70 , determined the fat concentration by acid hydrolysis method 71 , the concentration of dietary fiber was determined by enzymatic-gravimetric method 72 .Agilent 7900 inductively coupled plasma mass spectrometer (ICP-MS) (Agilent Technologies, Santa Clara, USA) was used to determine 14 nutrient elements (K, Ni, Mg, Fe, Ca, Na, Zn, Sr, Mn, Cu, Cr, V, Co, Se) 73 .

Quality zoning analysis of Codonopsis Radix
For the sake of studying the effect of habitat suitability on functional factors accumulation, we extracted the ecological factor value of each occurrence point through ArcGIS according to the longitude and latitude information of Codonopsis Radix, and the common peaks area of fingerprint spectrum, the average concentration of index components, effective compounds groups, nutritional components, and nutritional elements were compared to highly suitable areas with moderately suitable areas.Mann-Whitney U test was used to evaluate the concentration change of functional factors between different suitable regions.In order to explore the overall variability of Codonopsis Radix in different habitats, we constructed the all-in-one functional factor based on 22 functional factors in Codonopsis Radix, and used the principal component analysis (PCA) model to predict the origin of samples (highly suitable area and moderately suitable area) by using the all-in-one functional factor of 134 batches of Codonopsis Radix after processing.The ecological environment is the result of the comprehensive action of various ecological factors.Therefore, using the stepwise regression analysis method of SPSS software, the above-screened ecological factors were taken as a whole to measure the impact of ecological factors on the functional factors of Codonopsis Radix, and the regression model was established.Based on the model of each functional factor, the spatial distribution of the concentration of each functional factor was analyzed by ArcGIS.And the obtained functional factors spatial distribution and suitability maps were processed uniformly, and a linear function was selected to obtain a numerical range of 0-1 for all layers.Then, fuzzy superposition analysis was used to obtain the quality zoning map of Codonopsis Radix in Gansu Province.At the same time, from the medicinal and edible aspects of Codonopsis Radix, the common peaks area of the fingerprint spectrum, the index components, and effective compounds groups were used as the indicators to evaluate the quality of Codonopsis Radix when it was used as medicine, and the nutritional components and nutritional elements were used as the indicators to evaluate the quality of Codonopsis Radix when it was used as food.Finally, it was superimposed with the habitat suitability distribution map of Codonopsis Radix and obtained the medicinal quality zoning map

Figure 1 .
Figure 1.(A) Spatial distribution of Codonopsis pilosula in Gansu Province, (B) The ROC curves of MaxEnt models for Codonopsis pilosula, (C) The results of the jackknife test are of variable importance, (D) The habitat suitability distribution map of Codonopsis pilosula in Gansu Province (The maps were prepared by Zixia Wang and Yanjun Jia in ArcGIS Pro, https:// www.esri.com/ zh-cn/ arcgis/ produ cts/ arcgi scn/ arcgis/ produ cts/ arcgis-pro/ resou rces).

Figure 3 .
Figure 3. (A) The standard fingerprint of Codonopsis Radix in eight counties of Gansu Province, (B) PCA analysis of functional factors concentration between different suitable habitats, (C) The quality zoning map of Codonopsis Radix in Gansu Province(The maps were prepared by Zixia Wang and Yanjun Jia in ArcGIS Pro, @@@).
them, the indicators related to precipitation were clustered into one category, including Precipitation of April, Precipitation of May, Precipitation of October, Precipitation of November, and Precipitation of Driest Month, the indicators related to temperature were clustered into one category, including Solar Radiation of October and Max Temperature of Warmest Month, the indicators related to soil topography were clustered into one category, including Soil Unit Symbol (FAO-90), Soil available water https://doi.org/10.1038/s41598-023-46546-6

Figure 5 .
Figure 5. Research process and results of the article.

Table 1 .
Ecological factors variable information.

Table 2 .
Percentage contribution and permutation importance of ecological factors.
Ecological factors Percent contribution/% Permutation importance/% Vol.:(0123456789) Scientific Reports | (2023) 13:20726 | https://doi.org/10.1038/s41598-023-46546-6 County, Zhangxian County, Minxian County, Tanchang County, Lintan County, and Wenxian County, respectively).Based on the matched 20 common peaks, a control map was generated and similarity was calculated.The results was shown in Table3, indicating that the similarity values range from 0.649 to 0.975, indicating differences in the chemical composition content of Codonopsis Radix in different regions.The cumulative contribution rate of the five principal components obtained from principal component analysis reached 90.39%.This indicates that these 5 principal components have an overall interpretation rate of over 90%, which can represent the initial 20 common peak variables.The specific eigenvalues and contribution rates are shown in Table

Table 3 .
Similarity Values of Codonopsis Radix in eight districts of Gansu Province.
Figure 4. Correlation analysis between ecological factors and functional factors concentrations.Note: Significant differences (*: P < 0.05, **: P < 0.01).Vol.:(0123456789)Scientific Reports | (2023) 13:20726 | https://doi.org/10.1038/s41598-023-46546-6www.nature.com/scientificreports/ 53donopsis Radix in different producing areas and different suitable areas of Codonopsis pilosula had a significant impact on the accumulation of functional factors, indicating that the highly suitable area as the planting area of Codonopsis pilosula can provide high-quality TCM53.Considering that the ecological environment is the result of the comprehensive action of various ecological factors, a regression model between ecological factors and functional factors was established to evaluate the changes of Codonopsis Radix quality in different ecological environments as a whole.The results showed that no matter the comprehensive quality zoning map of Codonopsis Radix or the medicinal and edible quality zoning map of Codonopsis Radix, most of the high-quality areas were located in the high suitability area of Codonopsis pilosula, while the low-quality areas were located in the low suitability area, indicating that the suitability of the ecological suitability area was related to the spatial quality changes of functional factors of Codonopsis Radix, and the suitable growth area was also conducive to the production and accumulation of secondary metabolites of Codonopsis pilosula.For example, Wenxian County, Wudu District, and surrounding counties in Gansu Province are the main producing areas of C. pilosula var.modesta, Lintao County, Weiyuan County, Longxi County, Zhangxian County and surrounding counties in Gansu Province are the main producing areas of C. pilosula.It is not only a highly suitable growth area for Codonopsis pilosula but also a comprehensive high-quality area for Codonopsis Radix.It can be seen that the quality of C. pilosula var.modesta produced in Wenxian County and surrounding counties and districts is higher than that of C. pilosula produced in other producing areas of Gansu Province, which is consistent with the popularity of people caused by the efficacy and yield of Codonopsis Radix in different producing areas and the long-term price formed in the circulation of Codonopsis Radix market.The growth conditions of C. pilosula var.modesta are more demanding, requiring planting land above 2000 m above sea level, and then growing for 4~6 years and ) Scientific Reports | (2023) 13:20726 | https://doi.org/10.1038/s41598-023-46546-6www.nature.com/scientificreports/

Quality zoning analysis based on the all-in-one functional factor of Codonopsis Radix
Three standards (lobetyolin, atractylenolide III, syringin) were purchased from Sigma-Aldrich.Chromatographic grade methanol and acetonitrile were purchased from Guangzhou Aixin Scientific Instrument Co., Ltd.(Guangzhou, China), other chemical reagents are analytical grade, and ultra-pure water is re-distilled self-made deionized water.Standard (D-glucose) was purchased from the National Institutes for Food and Drug Control.Amino acid reference substances (Ala, Arg, Asp, Met, Cys, Glu, Gly, Lys, His, le, Leu, Tyr, Phe, Pro, Ser, Thr, Val) were purchased from SIGMA-ALDRICH.Catalyst sheet (FOSS, Denmark), Thermal stability α-amylase (ShanghaiyuanyeBio-TechnologyCo., Ltd.), Alkaline protease (Beijing SuoLaibao Technology Co., Ltd.), Starch glucosidase (Shanghai Macklin Biochemical Co., Ltd.), Multi-element standard solution (Inorganic Ventures, USA).Codonopsis Radix sample: In this study, 134 batches of Codonopsis Radix samples were collected from Weiyuan County, Lintao County, Longxi County, Zhangxian County, Minxian County, Tanchang County, Lintan County and Wenxian County in Gansu Province.The samples were identified by Professor Hu Fangdi of Lanzhou University as the roots of Codonopsis pilosula (Franch.)Nannf.(C.pilosula) and Codonopsis pilosula var.modesta (Nannf.)L.T.Shen (C.pilosula var.modesta).Specific information is shown in Table Index componentSample preparation was performed in the light of a previously reported method, and made appropriate adjustments.The preparation method for the analysis samples of lobetyolin and atractylenolide III is the same: sample powder (The powder of Codonopsis Radix (2.0 g) was added with 20 mL methanol for reflux extraction.After filtration, 16 mL methanol was added for reflux extraction, 40 min each time.